package com.team11.server.controller.teacher;


import com.team11.server.service.ICInformationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author pjc
 * @since 2021-06-15
 */
@CrossOrigin
@RestController
@RequestMapping("/teacher")
@Api(tags = "教师接口")
public class TeacherCInformationController {

    @Resource
    private ICInformationService icInformationService;

    @ApiOperation(value = "下拉框：所有专业名称")
    @GetMapping("/getMajor")
    public List<String> getMajor() {
        List<String> list = (List<String>) icInformationService.getMajor();
        return list;
    }

    @ApiOperation(value = "下拉框：所有年级名称")
    @GetMapping("/getGrade")
    public List<String> getGrade() {
        List<String> list = (List<String>) icInformationService.getGrade();
        return list;
    }

    @ApiOperation(value = "下拉框：所有班级名称")
    @GetMapping("/getCClass")
    public List<String> getCClass() {
        List<String> list = (List<String>) icInformationService.getCClass();
        return list;
    }

    @ApiOperation(value = "下拉框：所有学院名称")
    @GetMapping("/getCDepartment")
    public List<String> getCDepartment() {
        List<String> list = (List<String>) icInformationService.getCDepartment();
        return list;
    }
}
